function [price]=adjPrice(price,varargin)

b=size(price,2);
for i=1:b
    if isempty(varargin)    %     k=find(price(:,i)==0);
        k=sort([find(price(:,i)==0);find(isnan(price(:,i)))]);
    else
        k=find(isnan(price(:,i)));
    end
    if k~=0
        
        for j=1:length(k)
            price(k(j),i)=price(k(j)-1,end);
        end
    end
end
